#include "triangle.h"

Triangle::Triangle()
{

}

Triangle::Triangle(int a, int b, int c)
{
    m_line1 = a;
    m_line2 = b;
    m_line3 = c;
}
//获取三角形类型
QString Triangle::getType()
{
    if(m_line1 == m_line2 && m_line1 == m_line3)
    {
        return "等边三角形";
    }
    else if(m_line1 == m_line2 || m_line1 == m_line3 || m_line2 == m_line3)
    {
        return "等腰三角形";
    }
    else{
        return "普通三角形";
    }
}
